/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package bookstore.service;

import bookstore.dao.OrderDetailsDao;
import bookstore.idao.IBookDao;
import bookstore.idao.IOrderDao;
import bookstore.idao.IOrderDetailsDao;
import bookstore.iservice.IOrderDetailsService;
import bookstore.model.Order;
import bookstore.model.Orderdetails;
import java.util.List;

/**
 *
 * @author MY
 */
public class OrderDetailsService implements IOrderDetailsService  {
    private IOrderDetailsDao orderDetailsDao =new OrderDetailsDao(); 
    
    @Override
     public List<Orderdetails> findDetails(Order order)
     {
         return this.orderDetailsDao.findDetails(order);
     }
     @Override
    public void setDetailDao(IOrderDetailsDao detailDao){
        this.orderDetailsDao = detailDao;
    };

     @Override
    public void addOrderDetails(Orderdetails detail){
        orderDetailsDao.insert(detail);
    };

    
}
